// 空对象
let person: {} = {};
person = { name: 'xxx', age: 16 };

// 具体的对象
let person1: { name: number } = {
  name: 123,
};

// person1 的类型就会检查
// person1 = {
//   name: 123
// }

person1 = {
  name: 123,
};

// 对象里有方法
let person2: { name: string; sayHi(): void } = {
  name: 'rose',
  sayHi() {
    console.log('help');
  },
};

export {};
